-- GENERATED SPELL FOR [Champion Sunstriker] --


function spell0_17812(pUnit, Event) --@Flash of Light,Heal--
pUnit:FullCastSpellOnTarget(19939,pUnit)
pUnit:RegisterEvent('Sorts_17812', 1500, 1)
end

function spell1_17812(pUnit, Event) --@Seal of Command,n/a--
pUnit:FullCastSpellOnTarget(20424,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17812', 598, 1)
end

function spell2_17812(pUnit, Event) --@Seal of Command,Self--
pUnit:FullCastSpellOnTarget(20375,pUnit)
pUnit:RegisterEvent('Sorts_17812', 689, 1)
end

function Sorts_17812(pUnit, Event)
local choix_sorts_17812 = math.random(0, 2)
if choix_sorts_17812 == 0 then
pUnit:RegisterEvent('spell0_17812', 1, 1)
end
if choix_sorts_17812 == 1 then
pUnit:RegisterEvent('spell1_17812', 1, 1)
end
if choix_sorts_17812 == 2 then
pUnit:RegisterEvent('spell2_17812', 1, 1)
end
end

function mob17812_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17812', math.random(1500, 3000), 1)
end

function mob17812_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17812_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17812_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17812, 1, 'mob17812_Action')
RegisterUnitEvent(17812, 2, 'mob17812_Leave')
RegisterUnitEvent(17812, 3, 'mob17812_Kill')
RegisterUnitEvent(17812, 4, 'mob17812_Die')
